_Bool a[10];
_Bool b[10];
__attribute__((noinline))
void test(int cond) {
  // init
  for (int i = 0; i < cond; i++) {
    a[i] = i / 2;
  }

  // be careful with these conversions
  for (int i = 0; i < cond; i++) {
    b[i] = 1 - (int)(unsigned short)a[i];
  }

  for (int i = 0; i < cond; i++) {
    if (b[i] == a[i]) {
      abort();
    }
  }
}

int main() {
  test(10);
  return 0;
}
